#ifndef MESSAGES_H
#define MESSAGES_H

#include <ouden.h>

using ouden::Vector;
using ouden::Scalar;

//Main game message receiver class
class CMessageReceiver : public ouden::IMessageReceiver
{
	
public:
	
	//Events called when messages of the given type are received
	//Add a new receive function for each message type here
	virtual void receiveMessage(CMSG_Update* pMessage) 				{}
	virtual void receiveMessage(CMSG_ExplosionHit* pMessage) 		{}
	
};

//Explosion message
class CMSG_ExplosionHit : public ouden::IMessage<CMessageReceiver>
{

public:
	
	CMSG_ExplosionHit(Vector vForce, Scalar fFireDamage)
		 : m_vForce(vForce), m_fFireDamage(fFireDamage) 		{}
	
	virtual void send(CMessageReceiver* pReceiver)
	{
		pReceiver->processMessage(this);
	}
	
	const Vector getForce() 		{ return m_vForce; }
	const Scalar getFireDamage() 	{ return m_fFireDamage; }
	
private:
	
	Vector m_vForce;
	Scalar m_fFireDamage;
	
};

#endif //MESSAGES_H